//
//  LOAudioStreamer.h
//  LOAudioStreamer
//
//  Created by 何欣 on 15/6/3.
//  Copyright (c) 2015年 何欣. All rights reserved.
//

#import <Foundation/Foundation.h>

@class LOAudioStreamer;

@protocol LOAudioStreamerDelegate <NSObject>

@optional

-(void)audioStreamer:(LOAudioStreamer *)streamer
didPlayingWithProgress:(float)progress;

-(void)audioStreamerDidFinishPlaying:(LOAudioStreamer *)streamer;

@end

@interface LOAudioStreamer : NSObject
@property(nonatomic,assign)id<LOAudioStreamerDelegate>delegate;
@property(nonatomic,assign) float volume;//播放器的音量

@property(nonatomic,assign) float druation;
@property(nonatomic,assign) float progress;
@property(nonatomic,assign) float totalBuffer;
//单例方法  返回音频流对象
+ (instancetype)sharedStreamer;

//设置音频播放url
- (void)setAudioMetadataWithURL:(NSString *)urlString;
- (void)seekToTime:(float)time;//跳转到指定时间播放
- (void)setLocalMetadataWithURL:(NSString *)urlString;
- (void)play;
- (void)pause;
- (void)stop;

-(BOOL)isPlaying;//判断是否正在播放
-(BOOL)isPrepared;//判断是否准备完成
-(BOOL)isPlayingCurrentAudioWithURL:(NSString *)urlString;//是否播放指定的url


@end
